//package demo3;

//public class Test3 {
   /* public static void main(String[] args) {
        *//*IShape iShape = new IShape();*//*
        IShape iShape1 = new Rect();//向上转型
        IShape iShape2 = new Cycle();
        drawMap(new Cycle());
        drawMap(new Rect());
    }

    public static void drawMap(IShape shape){
        shape.draw2();
    }
}//

interface IShape{
    *//*public abstract void draw();*//*
    void draw4();
   *//* default  public void draw2(){
        System.out.println();//可以选择重写
    }*//*
    *//*public  static void draw3(){
        System.out.println();*//*
    *//*}*//*///静态不能被重写

    *//*public*//* int i = 0;
   *//* public static final*//* int j = 9;
    int m = 9;
}

class Cycle implements IShape{

    @Override
    public void draw4() {
        System.out.println("⭕");
    }

    @Override
    public void draw2() {
        System.out.println("重写方法");
    }
}

class Rect implements IShape{

    @Override
    public void draw4() {
        System.out.println("矩形");
    }
}*/